1. Field of the Invention
The present invention relates to a motor controller.
2. Description of the Related Art
According to a known control method for controlling a motor, when the direction of movement of a driven body driven by the motor is reversed, an amount of correction is added to a command given to the motor in order to assist in the reverse movement and overcome the friction generated on the driven body, a transmission or the like. This kind of correction even hinders the realization of desired movement of the driven body during a normal operation, and accordingly it is necessary to terminate the correction after the driven body is moved over a certain distance in the reverse direction.
For example, JP H2-093711 A discloses a controller which performs a correction by adding a certain amount of correction to a speed command when the rotational direction of the motor is reversed, wherein the correction is terminated when an integrated value of speeds fed back from the motor (i.e. the amount of displacement of the motor) reaches a predetermined value.
However, in the case of determining the timing of termination of the correction based only on monitoring the amount of displacement of the motor, it is not possible to accurately determine the movement of the driven body after the movement direction is reversed. Namely, an accurate correspondence between the amount of displacement of the motor and the amount of displacement of the driven body is unknown, and therefore it is difficult to terminate the correction at an appropriate time.
On the other hand, in the case of determining the timing of termination of the correction based only on monitoring the amount of displacement of the driven body after the direction of movement is reversed, if there is an elastic body such as a spring element incorporated into a transmission between the motor and the driven body, the correction may not be terminated at an appropriate time. Specifically, in such a case, when the movement direction of the driven body is reversed, elastic energy is accumulated in the elastic body. This may result in delayed movement of the driven body due to the elastic energy being released after the movement direction is reversed, even if the correction is properly terminated when the amount of displacement of the driven body reaches a predetermined value. Consequently, there is a possibility of delaying the termination of the correction.
Therefore, there is a demand for a motor controller which terminates a correction at an appropriate time when the movement direction is reversed.